package com.magenta.maxoptra.gis;

import com.magenta.maxoptra.gis.format.postal.ParsePostalCodeException;

import javax.naming.NamingException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author Sergey Grachev
 */
public interface AuxiliaryCacheServiceMBean {

    GeoRoute approximatePostalCodesRoute(String country, String from, String to)
            throws ParsePostalCodeException, SQLException, NamingException, InterruptedException;

    GeoRoute approximateCoordinatesRoute(String country, String fromLat, String fromLon, String toLat, String toLon)
            throws ParsePostalCodeException, SQLException, NamingException, InterruptedException;

    PostalCodeDistanceMatrix postalCodesDistanceMatrix(List<PostalCode> postalCodes);
}
